// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------

import request from "@/utils/request.js";

/**
 * 获取发货中物流数据
 * 
 */
export function get_doing() {
	return request.get('doing');
}


/**
 * 获取主页信息 
 * 
 */
export function index() {
	return request.get('plat_index/1', {}, {
		noAuth: true
	});
}


/**
 * 用户押金支付
 * @param object data
 */
export function depositPay(data) {
	return request.post('user_deposit_pay', data);
}


/**
 * 物流信息订单
 * 
 */
export function logisticOrderList(data) {
	return request.get('driver_order_list', data);
}


/**
 * 物流信息详情
 * @param object data
 */
export function driver_detail(id) {
	return request.get(`driver_order_detail/${id}`);
}

/**
 * 取消订单
 * @param object data
 */
export function cancel(id) {
	return request.get(`order_logistic_cancel/${id}`);
}

/**
 * 申请退款订金
 * @param object data
 */
export function replyOrderAmount(id) {
	return request.get(`order_logistic_reply_order_mount/${id}`);
}

/**
 * 取消申请退款订金
 * @param object data
 */
export function cancelReplyOrderAmount(id) {
	return request.get(`order_logistic_cancel_reply_order_mount/${id}`);
}

/**
 * 完成装货
 * @param object data
 */
export function driveFinishedLoad(id,o_id) {
	return request.get(`driver_finishedLoad/${id}/${o_id}`);
}

/**
 * 完成送达
 * @param object data
 */
export function driverFinishedOrder(id,o_id) {
	return request.get(`driver_finishedOrder/${id}/${o_id}`);
}

/**
 * 提现申请
 * @param object data
 */
export function driverCash(data) {
	return request.post('driver/cash', data)
}

/**
 * 平台设置
 * 
 */
export function baseSetting() {
	return request.get('base_setting');
}

/**
 * 物流需求大厅列表
 * 
 */
export function squareRequireList(data) {
	return request.get('square_require_list', data);
}

/**
 * 物流需求详情
 * @param object data
 */
export function logis_detail(id) {
	return request.get(`order_logistic_detail/${id}`);
}

/**
 * 接单
 * @param object data
 */
export function receiveOrder(id) {
	return request.get(`driver_receive/${id}`);
}


/**
 * 司机申请
 * @param object data
 */
export function driverReply(data) {
	return request.post(`driver_reply`,data);
}

/**
 * 获取用户提交的申请
 * @param object data
 */
export function driverGetReply() {
	return request.get(`driver_get_reply`);
}

/**
 * 支付会员
 * @param object data
 */
export function c(type) {
	return request.get(`pay_vip/${type}`);
}

/**
 * 会员权益信息
 * @param object data
 */
export function vipInfo() {
	return request.get(`vip_info`);
}


/**
 * 验证码key
 */
export function getCodeApi() {
	return request.get("verify_code", {}, {
		noAuth: true
	});
}

/**
 * 发送验证码
 * @param data object 用户手机号
 */
export function send(data) {
	return request.post("verify_send", data, {
		noAuth: true
	});
}

/**
 * 过期自动取消订单(定金器触发)
 * @param object data
 */
export function driver_auto_cancel_order(id) {
	return request.get(`driver_autocancel_order/${id}`);
}